//获取应用实例
const app = getApp()
Page({
	data:{
		PouintList:{},
		integral:0,
		headimg:''
	}, 
	onLoad:function(){
		var that = this;
		//会员积分查询   
		app.request('/api/Member/getPoint', {}, function(res){
			if(res.code == '0'){
				var wechat = wx.getStorageSync('wechat');
				//更新数据
				that.setData({
					integral:res.data.JF,
					headimg:wechat.avatarUrl
				});
			}
		});	
		//积分明细
		app.request('/api/Member/getMemberPouintList', {}, function(res){
			if(res.code == '0'){
				//更新数据
				that.setData({
					PouintList:res.data
				});
			}
		});
	}
})